<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="../lib/layui/css/layui.css">
  <link  rel="stylesheet" type="text/css" href="../css/document/gth-order-list.css">
  <script type="text/javascript" src="../js/jquery-3.6.0.js"></script>
  <script src="https://layui.org.cn/res/layui/release/layer/dist/layer.js-v=351-1.js" ></script>
    <script type="text/javascript" src="../js/document/gth-order-list.js"></script>
    <title>Document</title>
</head>
<body>
  <h1 style="margin-left: 40px; font-family: 微软雅黑;">文档管理</h1>
  <input type="button" style="float:right;margin-top: -32px" class="layui-btn layui-btn-radius" onclick="backcate()" value="返回根列表">
  <br>
  <table border="0" class="layui_table Maincontent table-page" lay-even lay-skin="line" lay-size="lg">
    <tr>
      <td>文件名:</td>
      <td><input type="text" class="layui-input tfile"></td>
      <td align="center"><input type="button" style="margin-left: 20px" th:if="${orderby.size() ne 0}" th:onclick="'javascript:filelook(\''+${orderby.get(0).getParentId()}+'\')'" class="layui-btn layui-btn-radius" value="检索">
                          <input type="button" style="margin-left: 20px" th:if="${orderby.size() eq 0}" class="layui-btn layui-btn-radius" value="检索">
    </tr>
    <tr style="height: 80px;">
      <td colspan="8"><h2 th:if="${orderby.size() ne 0}" th:text="${orderby.get(0).getZtitle()}"></h2>  <h2 th:if="${orderby.size() eq 0}">此文件夹为空哦</h2>
      <input type="image" src="../images/document/jia.png" th:onclick="addfolder()" class="wenjianjia" ><span class="wenzi">添加文件夹</span>
        <input type="image" src="../images/document/tiantxt.png" onclick="addfiles()" class="wenjian"><span class="wenzi2">添加文件</span>
      </td>
    </tr>
  
    <tr>
      <th>序号</th>
      <th colspan="2">名称</th>
      <th>类型</th>
      <th colspan="1">所在部门</th>
      <th colspan="2">创建时间</th>
      <th colspan="2">操作</th>
    </tr>
    <tbody class="maininfo">
    <tr style="height: 55px" th:each="ob:${orderby}">
      <input type="hidden" th:value="${ob.getId()}" class="aid" >
      <input type="hidden" th:value="${ob.getParentId()}" class="pid" >
      <td align="center"></td>
      <span th:if="${ob.getType()==1}"><td colspan="2" class="place cname" th:text="${ob.getTitle()}" th:onclick="'javascript:orderby(\''+${ob.getId()}+'\')'"></td></span>
      <td th:if="${ob.getType()!=1}" colspan="2" class="place cname" th:text="${ob.getTitle()}">
      <td align="center" th:if="${ob.getType()}==1"><img src="../images/document/jia2.png"></td>
      <td align="center" th:if="${ob.getType()}==2"><img src="../images/document/doc.png"></td>
      <td align="center" th:if="${ob.getType()}==3"><img src="../images/document/txt.png"></td>
      <td align="center" th:if="${ob.getType()}==4"><img src="../images/document/jpg.png"></td>
      <td align="center" th:if="${ob.getType()}==5"><img src="../images/document/pdf.png"></td>
      <td align="center" th:if="${ob.getType()}==6"><img src="../images/document/xls.png"></td>
      <td align="center" th:if="${ob.getType()}==7"><img src="../images/document/zip.png"></td>
       <td colspan="1" class="place screenwriter" th:text="${ob.getDepartment().getDepartmentname()}"></td>
       <td colspan="2" class="place screenwriter" th:text="${#dates.format(ob.getCreateDate(),'yyyy-MM-dd')}"></td>
       <td colspan="2" class="place"><input type="button" style="height: 30px;line-height: 30px;" class="layui-btn  layui-btn-normal" th:onclick="'javascript:lookupdate_order(\''+${ob.getId()}+'\')'" value="修改"><input style="height: 30px;line-height: 30px;" type="button" class="layui-btn  layui-btn-danger" th:onclick="'javascript:reupdate(\''+${ob.getId()}+'\')'" value="删除">
         <span style="margin-left: 10px" th:if="${ob.getType() != 1}"><input type="button" style="height: 30px;line-height: 30px;" class="layui-btn  layui-btn-normal" th:onclick="down([[${ob.getNewfilename()}]])" value="下载"></span>
         <span style="margin-left: 10px" th:if="${ob.getType() != 1}"><button style="height: 30px;line-height: 30px;" class="layui-btn"  th:onclick="che([[${ob.getPath()}]])" >查看</button></span>
       </td>
    </tr>
    </tbody>
  </table>
</body>
</html>